<%@ page language="java" import="java.util.ArrayList, com.erclab.internal.xpresso.options.*, com.erclab.internal.xpresso.webapp.JavascriptFormValidator" %>
<div id="<%=theReport.getReportName()%>Filters">
<SCRIPT LANGUAGE="JavaScript">
	<%	JavascriptFormValidator jfv = new JavascriptFormValidator(); %>
	<%=jfv.getFilterValidationScript(theReport)%>
</SCRIPT>
<form name="<%=theReport.getReportName()%>Filters" method="post" action="<%=theReport.getReportName()%>.report">
<%  ArrayList filters = theReport.getReportFilters();
	if (filters != null){ 
		for (int i = 0; i < filters.size(); i++){
			ReportFilter f = (ReportFilter)filters.get(i);
%>
		<div id="<%=f.getStyle()%>Filter">			
			<span class="<%=f.getStyle()%>FilterLabel"><%=f.getLabel()%></span>
			<span class="<%=f.getStyle()%>FilterConditions"><%=f.conditionTypesToHTML(theReport)%></span>
			<span class="<%=f.getStyle()%>FilterBox"><%=f.filterBoxToHTML(theReport)%></span>
		</div>
<%  	}
	} 
	if (request.getParameter("uniqueKeyValue") != null){ %>
		<input type="hidden" name="uniqueKeyValue" value="<%=request.getParameter("uniqueKeyValue")%>">
<%	} 
	if (request.getParameter("pageNum") != null){ %>
		<input type="hidden" name="pageNum" value="<%=request.getParameter("pageNume")%>">
<%	} %>
	<input type="button" class="<%=theReport.getStyle()%>FilterSubmitButton" onClick="validate<%=theReport.getReportName()%>Filters()" value="Submit &gt;">
</form>
</div>